foitzik.dev // my collection of random things and thoughts

Writing Integration Tests for kube-rs controllers

Writing proper integration or e2e tests for kubernetes controllers can be quite cumbersome. The domain of eventually consistent things makes it so that tests have check things in intervals or be very smart and know when something failed early and terminate.

And after the previous paragraph I stopped writing a very long time ago, maybe half a year or longer. Since then https://github.com/kube-rs/envtest was created or at least I was not aware of it before.

This makes my write-up and analysis obsolete so this post will simply consist of me recommedning you to checkout that awesome project the maintainers of kube-rs have created (and by proxy, since it is afaik a wrapper the k8s authors that worked on the underlying tool).